home *** CD-ROM | disk | FTP | other *** search
/ Palm Utilities / Palm_Utilities_CD-ROM_2001_2001.iso / files / internet misc / GetTLE 1.0 / GetTLE.exe / Src / alerts.c next >
Encoding:
C/C++ Source or Header  |  2000-04-15  |  1.7 KB  |  63 lines

  1. /*
  2.     GetTLE - alerts.h - Handling of alerts - the implementation
  3.     Copyright ⌐2000 Andreas Schneider
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. */
  19.  
  20. #ifdef linux
  21. #include <stdio.h>
  22. #else
  23. #include <PalmOS.h>
  24. #include "GetTLERsc.h"        // application resource defines
  25. #endif
  26. #include "alerts.h"
  27.  
  28.  
  29. // Error message pop up function that displays one or two strings
  30. extern void MyErrorFunc(char *error, char *additional)
  31. {
  32. #ifdef linux
  33.   fprintf(stderr,"ERR: %s %s\n",error,additional?additional:"");
  34. #else
  35.     FrmCustomAlert(ErrorAlert, error, additional ? additional : "", NULL);
  36. #endif
  37.   return;
  38. }
  39.  
  40. // pop up a status message
  41. extern void MyStatusFunc(char *status)
  42. {
  43. #ifdef linux
  44.   fprintf(stderr,"MSG: %s\n",status);
  45. #else
  46.     FrmCustomAlert(StatusAlert, status, NULL, NULL);
  47. #endif
  48.   return;
  49. }
  50.  
  51. extern short MyConfirmFunc(char *question)
  52. {
  53.   short confirmed=0;
  54. #ifdef linux
  55. #else
  56.   if (FrmCustomAlert(ConfirmAlert,question,NULL,NULL)==ConfirmYes)
  57.   {
  58.     confirmed=1;
  59.   }
  60. #endif
  61.   return confirmed;
  62. }
  63.